part of 'joy_home_bloc.dart';

@immutable
sealed class JoyHomeEvent {}

class GetJOYSearchCategoryProductEvent extends JoyHomeEvent{
  final BuildContext context;
  final String category;
  final String sortColumn;
  final String orderBy;
  final int pageSize;
  final int pageNum;
  GetJOYSearchCategoryProductEvent(this.context,this.category,this.pageNum,this.pageSize,{required this.sortColumn,required this.orderBy});
}

class GetJOYHotProductListEvent extends JoyHomeEvent{
  final BuildContext context;
  final int pageSize;
  final int pageNum;
  final bool needLoad;

  GetJOYHotProductListEvent(this.context,this.pageNum,this.pageSize,this.needLoad);
}

class GetJOYSearchProductEvent extends JoyHomeEvent{
  final BuildContext context;
  final String productName;
  final int pageSize;
  final int pageNum;
  GetJOYSearchProductEvent(this.context,this.productName,this.pageNum,this.pageSize);
}

class GetJOYHomeDataBannerAndProductEvent extends JoyHomeEvent{
  final BuildContext context;
  final String websiteName;
  GetJOYHomeDataBannerAndProductEvent(this.context,this.websiteName);
}


class GetJOYHomeCategoryEvent extends JoyHomeEvent{
  final BuildContext context;
  final String platform;
  final String? CategoryID;

  GetJOYHomeCategoryEvent(this.context,this.platform,this.CategoryID);
}

class PostJOYUserLoginEvent extends JoyHomeEvent{
  final BuildContext context;
  final String userName;
  final String pwd;
  PostJOYUserLoginEvent(this.context,this.userName,this.pwd);
}


class PostJOYUserLoginOutEvent extends JoyHomeEvent{
  final BuildContext context;
  final String userName;
  final String pwd;
  final String type;///1: logout, 2: delete account, no value for login
  PostJOYUserLoginOutEvent(this.context,this.userName,this.pwd,this.type);
}


class GetJOYProductDetailEvent extends JoyHomeEvent{
  final BuildContext context;
  final String channel;
  final String itemNo;
  final String platformName;
  GetJOYProductDetailEvent(this.context,this.channel,this.itemNo,this.platformName);
}


class GetJOYSearchKeyListEvent extends JoyHomeEvent{
  final BuildContext context;
  final String productName;
  GetJOYSearchKeyListEvent(this.context,this.productName);
}




/// 上传文件
class PostUploadFileEvent extends JoyHomeEvent {
  final BuildContext context;
  final String imageFile;
  PostUploadFileEvent(this.context,this.imageFile);
}

/// 图片搜索
class GetSearchImageEvent extends JoyHomeEvent {
  final BuildContext context;
  final String imageFile;
  final String channel;
  final int pageNum;
  final int pageSize;
  final int sort;
  final int? type;
  GetSearchImageEvent(this.context,this.imageFile,this.channel,this.pageNum,this.pageSize,this.sort,this.type);
}


/// new图片搜索
class GetSearchNewImageEvent extends JoyHomeEvent {
  final BuildContext context;
  final String imageFile;
  GetSearchNewImageEvent(this.context,this.imageFile);
}


/// 图片相似搜索
class GetSearchSimilarityImageEvent extends JoyHomeEvent {
  final BuildContext context;
  final String imageFile;
  GetSearchSimilarityImageEvent(this.context,this.imageFile);
}


/// 判断是否收藏
class postProductIsCollectedEvent extends JoyHomeEvent {
  final BuildContext context;
  final String spu;
  postProductIsCollectedEvent(this.context,this.spu);
}

class postAddProductCollectedEvent extends JoyHomeEvent {
  final BuildContext context;
  final String spu;
  postAddProductCollectedEvent(this.context,this.spu);
}

class PostProductCollectedListEvent extends JoyHomeEvent {
  final BuildContext context;
  final int pageSize;
  final int pageNum;
  final bool needLoad;
  PostProductCollectedListEvent(this.context,this.pageNum,this.pageSize,this.needLoad);
}


///历史浏览数据
class GetHistoryProductViewEvent extends JoyHomeEvent {
  final BuildContext context;
  final int pageSize;
  final int pageNum;
  GetHistoryProductViewEvent(this.context,this.pageNum,this.pageSize);
}